/*
 * @lc app=leetcode.cn id=1 lang=java
 *
 * [1] 两数之和
 */

// @lc code=start
class Solution {
    public int[] twoSum(int[] nums, int target) {
        int[] result = new int[2];
        for(int i=nums.length-1;i>0;i--){
            for (int j = 0; j < i; j++) {
                if(nums[i]+nums[j] == target){
                    result[0] = j;
                    result[1] = i;
                    return result;
                }
            }
        }
        return result;
    }
}
// @lc code=end

